<template>
  <div class="r-banner">
    <div class="banner-nav">
      <router-link to="/">美团外卖</router-link>
      <router-link to="/">猫眼电影</router-link>
      <router-link to="/">美团酒店</router-link>
      <router-link to="/">民宿&nbsp;/&nbsp;酒店</router-link>
      <router-link to="/">商家入驻</router-link>
      <router-link to="/">美团公益</router-link>
    </div>
    <div class="banner-bar">
      <el-carousel class="banner" height="100%">
        <el-carousel-item v-for="(item, i) in banner" :key="i">
          <img :src="item" alt="" />
        </el-carousel-item>
      </el-carousel>
      <router-link to="/">
        <img
          class="pic-1"
          src="http://p0.meituan.net/codeman/e473bb428f070321269b23370ff02ba956209.jpg"
          alt=""
      /></router-link>
      <div class="user-entry">
        <div class="user-bar">
          <div class="avatar">
            <img
              src="//s0.meituan.net/bs/fe-web-meituan/e350c4a/img/avatar.jpg"
              alt=""
            />
          </div>
          <p>Hi! 你好</p>
          <router-link to="/">注册</router-link>
          <router-link to="/">立即登录</router-link>
        </div>
      </div>
    </div>
    <div class="banner-pic clearfix">
      <router-link to="/">
        <img
          class="pic-2"
          src="http://p1.meituan.net/codeman/8cce56c467a17e04f3094d1e455462a0132772.png"
          alt=""
      /></router-link>
      <router-link to="/">
        <img
          class="pic-2"
          src="http://p1.meituan.net/codeman/16442c19da1f1c4544f794e29d99c92051716.jpg"
          alt=""
      /></router-link>
      <router-link to="/">
        <img
          class="pic-3"
          src="http://p1.meituan.net/codeman/5b21cddb4bb1cbc3a9c3bce0f726c75940469.jpg"
          alt=""
      /></router-link>
      <div class="download-app">
        <img
          src="//s1.meituan.net/bs/fe-web-meituan/60ac9a0/img/download-qr.png"
          alt="下载APP"
        />
        <p class="app-name">美团APP手机版</p>
        <p class="sl"><span class="red">1元起</span>吃喝玩乐</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      banner: [
        "http://p1.meituan.net/codeman/826a5ed09dab49af658c34624d75491861404.jpg",
        "http://p0.meituan.net/codeman/a97baf515235f4c5a2b1323a741e577185048.jpg",
        "http://p0.meituan.net/codeman/33ff80dc00f832d697f3e20fc030799560495.jpg",
        "https://p1.meituan.net/travelcube/01d2ab1efac6e2b7adcfcdf57b8cb5481085686.png",
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.r-banner {
  float: left;
  margin-top: 10px;
  margin-left: 10px;
  position: relative;
  .banner-nav {
    position: absolute;
    top: -45px;
    left: 20px;

    a {
      display: inline-block;
      color: #222;
      font-weight: bold;
      margin: 0 20px;
      cursor: pointer;
      &:hover {
        color: #ef8c00;
      }
    }
  }
  .banner-bar {
    display: flex;
    .banner {
      width: 550px;
      height: 240px;
      overflow: hidden;
      img {
        width: 550px;
        height: 240px;
        object-fit: cover;
      }
    }
    .pic-1 {
      width: 150px;
      height: 240px;
      margin: 0 10px;
    }
    .user-entry {
      width: 228px;
      height: 238px;
      background-color: #fff;
      border: 1px solid #e5e5e5;
      .user-bar {
        padding-top: 30px;
        position: relative;
        text-align: center;

        .avatar {
          margin: 0 auto;
          margin-bottom: 5px;
          img {
            width: 47px;
            height: 47px;
            border-radius: 50%;
            border: 4px solid #e5e5e5;
          }
        }
        p {
          font-size: 16px;
        }
        a {
          width: 118px;
          text-align: center;
          margin: 10px auto 15px auto;
          background: #fff;
          border: 1px solid #e5e5e5;
          border-radius: 40px;
          font-size: 14px;
          color: #333;
          transition: background-color 0.5s;
          display: block;
          line-height: 38px;
          &:hover {
            background-color: #f6f6f6;
            transition: background-color 0.5s;
          }
        }
      }
    }
  }
  .banner-pic {
    margin-top: 10px;
    .pic-2 {
      width: 270px;
      height: 165px;
      margin-right: 10px;
      float: left;
    }
    .pic-3 {
      width: 150px;
      height: 165px;
      margin-right: 10px;
      float: left;
    }
    .download-app {
      width: 228px;
      height: 165px;
      background: #fff;
      border: 1px solid #e5e5e5;
      float: left;
      text-align: center;
      img {
        width: 95px;
        height: 95px;
        margin-top: 10px;
      }
      .app-name {
        font-size: 16px;
        color: #222222;
        font-weight: 500;
      }
      .sl {
        font-size: 12px;
        font-weight: 500;
        margin-top: 2px;
        color: #3f3f3f;
        .red {
          color: red;
          margin-right: 5px;
        }
      }
    }
  }
}
</style>